package com.edu.neusoft.student.domain;

import javax.validation.constraints.*;
import java.util.Date;
import lombok.Data;

@Data
public class Customer {

    @NotNull(message = "Customer ID cannot be null")
    private Integer customerid;

    @NotBlank(message = "First name is required")
    @Size(min = 1, max = 50, message = "First name must be between 1 and 50 characters")
    private String firstname;

    @NotBlank(message = "Last name is required")
    @Size(min = 1, max = 50, message = "Last name must be between 1 and 50 characters")
    private String lastname;

    @Pattern(regexp = "^\\+?[0-9]{1,15}$", message = "Phone number is invalid")
    private String phone;

    @Email(message = "Email should be valid")
    @Size(max = 100, message = "Email should not exceed 100 characters")
    private String email;

    @Size(max = 255, message = "Address cannot exceed 255 characters")
    private String address;

    @NotNull(message = "Registration date is required")
    private Date registrationdate;
}
